
     function queryActivityForm(pageIndex,pageSize)
     {
          var url =base+"/listActivity.do?pageIndex="+pageIndex+"&pageSize="+pageSize;
          var params =jQuery("#queryForm").serialize();
          params=decodeURIComponent(params,true); 
          jQuery("#activityContent").load(url+"&"+ encodeURI(encodeURI(params)));
     }


     function addActivityList()
     {
       location.href=base + "/toAddActivity.do";
     }

     function toEditActivity(id)
     {
       location.href=base+"/toEditActivity.do?activityId="+id;
     }



     function deleteActivity(id)
     {
              jQuery.post(
                      base+"/deleteActivity.do",
                      {activityId:id},
                      function(result){
                           queryActivityForm(1,15);
               });
     }
    
    function saveActivity()
   {   
         jQuery("#activityForm").ajaxSubmit(
           {
              type:"post",
              clearForm: true,        // 是否清空form  
              resetForm: true,       // 是否重置form  
              success:function(data)
              { 
                 var d= eval("("+data+")");
                 if(d.STATUS=="0")
                 {
                    alert("保存成功!");
                    location.href=base+"/activityManager.do";
                 }
                 else
                 {
                    alert(d.MSG);
                 }
              }
           }
          );
 }

 
  